package org.neuedu.chapter09_0701.demo02;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Calendar;
import java.util.Date;

public class CalendarDemo03 {
    public static void main(String[] args) {
        // 通过静态方法 getInstance 获取 Calendar 子类对象
        Calendar calendar1 = Calendar.getInstance();

        Calendar calendar2 = Calendar.getInstance();
        calendar2.set(2021, 10, 1, 0, 0, 0);

        if (calendar1.before(calendar2)) {
            System.out.println("hello");
        }

        calendar1.add(Calendar.HOUR_OF_DAY, 2);
        System.out.println(calendar1.getTime());
    }
}
